package com.itheima.a01mymap;

import java.util.Objects;

public class Student2 {
    private String name;
    private String choose;

    public Student2() {
    }

    public Student2(String name, String choose) {
        this.name = name;
        this.choose = choose;
    }

    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     * @return choose
     */
    public String getChoose() {
        return choose;
    }

    /**
     * 设置
     * @param choose
     */
    public void setChoose(String choose) {
        this.choose = choose;
    }

    public String toString() {
        return "Student2{name = " + name + ", choose = " + choose + "}";
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student2 student2 = (Student2) o;
        return Objects.equals(name, student2.name) && Objects.equals(choose, student2.choose);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, choose);
    }
}
